#include "LineSegment.h"

/// <Summary> The collision type of this object </Summary>
const HashString LineSegment::COLLISIONTYPE("COLLISION_LINESEGMENT");

////////////////////////////////////////////////////////////////////////////////////////////////////
/// <Summary>	Transforms this object by a matrix </Summary>
///
/// <Param name="transform">	The transform matrix	</Param>
////////////////////////////////////////////////////////////////////////////////////////////////////
void LineSegment::Transform(const Matrix4x4& transform)
{
	Vector3 point;
	TranslateVector( point, this->start, transform );
	this->start = point;
	TranslateVector( point, this->end, transform );
	this->end = point;
}

////////////////////////////////////////////////////////////////////////////////////////////////////
/// <Summary>	Prints this object to the console </Summary>
///
/// <Param name="out">	The console window </Param>
///
/// <Return>	The console window </Return>
////////////////////////////////////////////////////////////////////////////////////////////////////
ConsoleWindow& LineSegment::Print(ConsoleWindow& out) const
{
	return out << "\nLINESEGMENT:\n" << "Start:  " << start << "\nEnd:  " << end << "\n";
}